import QtQuick 2.14
import QtQuick.Controls 2.5
import Qt.labs.platform 1.0


Rectangle{
    id:filesave
    anchors.fill: parent
    Rectangle {
        id: inputBox
        width: 350
        height: 40
        color: "#F3F6FA"
        clip: true
        border.width: 1
        border.color: "#DFE0E4"
        radius: 5
        anchors.centerIn: parent

        TextInput {
            id: inputBoxInput
            text:folderDialog.folder
            color: "#707070"
            font.pixelSize: 16
            activeFocusOnTab: true
            selectByMouse: true //是否可以选择文本
            selectedTextColor: "white" //设置选择文本的字体颜色
            selectionColor: "#4A6DBC" //设置选择框的颜色
            verticalAlignment: TextInput.AlignVCenter
            horizontalAlignment: TextInput.AlignLeft
            anchors.fill: parent
            leftPadding: 3
            rightPadding: 3

            }
    }

    Button{
        text: qsTr("选择路径")
        height: 40
        width: 120
        anchors{
            verticalCenter: inputBox.verticalCenter
            left: inputBox.right
            leftMargin: 20
        }

        MouseArea{
        anchors.fill: parent
        onClicked: {
        folderDialog.open()
        }
    }

    FolderDialog {
        id: folderDialog
        folder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0] //默认打开Pictures文件夹\
        }
    }
}
